package com.lj.back.manage.scaffold.module.sys.DTO;

import com.lj.back.manage.scaffold.common.valid.group.AddStrategy;
import com.lj.back.manage.scaffold.common.valid.group.UpdateStrategy;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;
import java.io.Serializable;

/**
 * @author lv
 * @version 1.0.0
 */
@Data
@ApiModel("后台权限传输对象")
public class SysPermDTO implements Serializable {


    @NotNull(message = "{perm.id.notnull}",groups = UpdateStrategy.class)
    @Null(message = "{perm.id.isnull}",groups = AddStrategy.class)
    @ApiModelProperty(value = "权限ID", example = "1")
    private Long id;

    @NotNull(message = "{perm.name.notnull}",groups = AddStrategy.class)
    @Null(message = "{perm.name.isnull}",groups = UpdateStrategy.class)
    @ApiModelProperty(value = "权限名称", example = "sys:user:list")
    private String name;

    @NotNull(message = "{perm.describe.notnull}")
    @ApiModelProperty(value = "权限描述", example = "查询后台用户列表权限")
    private String describe;
}
